package com.shuma.product.ExceptionEnum;

/**
 * @author yaoyuan
 * @date 2024年06月17日 上午10:27
 */
public enum ExceptionEnum {
    SUCCESS(200,"成功"),
    PARAM_IS_INVALID(403,"参数无效"),
    PARAM_IS_BLANK(403,"参数为空"),
    PARAM_TYPE_BIND_ERROR(403,"参数类型错误"),
    PARAM_NOT_COMPLETE(403,"参数缺少"),
    USER_NOT_LOGGED_IN(403,"用户未登录"),
    USER_LOGGIN_ERROR(403,"账号不存在或密码错误"),
    USER_NOT_EXIST(403,"用户不存在"),
    USER_HAS_EXISTED(403,"用户已存在"),
    SYSTEM_ERROR(403,"服务器异常"),
    OPERATION_EXIST(403,"操作已经存在"),
    GODDSCONTENTS_ERROR(403,"商品参数不合法"),
    ADDOPERATION_FAIL(403,"添加数据库中的商品失败"),
    DELETEOPERATION_FAIL(403,"删除数据库中的商品失败"),
    UPDATEONLINE_FAIL(403,"更新上下线状态失败"),
    UPDATEOPERATION_FAIL(403,"更新数据库中的基础和详细商品失败"),
    GOODS_NOT_EXIST(403,"商品不存在"),
    REQUESTPARAM_FAIL(403,"请求参数错误"),
    CHECHATNOPASS_FAIL(403,"商品审核未通过，不能进行上下线操作！");

    private int code;
    private String message;

    ExceptionEnum(int code, String message) {
        this.code = code;
        this.message = message;
    }


    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
